import app from '@system.app';
import device from '@system.device';

export default {
    data: {
        title: 'World'
    },
    btn_exit() {
        console.info("btn_exit now ...");
        app.terminate();
    },
    btn_fun1() {
        console.info("btn_fun1 now ...");
        var info = app.getInfo();
        console.log(JSON.stringify(info));
    },
    btn_fun2() {
        console.info("btn_fun2 now ...");
        var info = device.getInfo({
            success: function(data) {
                console.log('Device information obtained successfully. Device brand:' + data.brand);
            },
            fail: function(data, code) {
                console.log('Failed to obtain device information. Error code:'+ code + '; Error information: ' + data);
            },
        });
        console.log(JSON.stringify(info));
    },
    btn_fun3() {
        console.info("btn_fun3 now ...");
    }
}


